package com.b511.swpu.cementbackend.dto.output;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class WorkBaseOutputDto2 {
    public String wellName;

    public String country;

    public String area;

    public String block;

    public String oilfield;

    private String geographicalPosition;

    private String structuralLocation;

    private String waterDepth;

    private String mudLine;

    private String wellType;

    private String wellSpacing;

    private String workCompany;

    private String drillingStartTime;

    private String drillingFinishTime;

    private String actualWellDepth;

    private String holeTemperature;

    private String holePressure;

    private String holeMaxDensity;

    //重写方法用于判断对象内的值相等
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (wellName == null ? 0 : wellName.hashCode());
        result = prime * result + (country == null ? 0 : country.hashCode());
        result = prime * result + (area == null ? 0 : area.hashCode());
        result = prime * result + (block == null ? 0 : block.hashCode());
        result = prime * result + (oilfield == null ? 0 : oilfield.hashCode());
        result = prime * result + (geographicalPosition == null ? 0 : geographicalPosition.hashCode());
        result = prime * result + (structuralLocation == null ? 0 : structuralLocation.hashCode());
        result = prime * result + (waterDepth == null ? 0 : waterDepth.hashCode());
        result = prime * result + (mudLine == null ? 0 : mudLine.hashCode());
        result = prime * result + (wellType == null ? 0 : wellType.hashCode());
        result = prime * result + (wellSpacing == null ? 0 : wellSpacing.hashCode());
        result = prime * result + (workCompany == null ? 0 : workCompany.hashCode());
        result = prime * result + (drillingStartTime == null ? 0 : drillingStartTime.hashCode());
        result = prime * result + (drillingFinishTime == null ? 0 : drillingFinishTime.hashCode());
        result = prime * result + (actualWellDepth == null ? 0 : actualWellDepth.hashCode());
        result = prime * result + (holeTemperature == null ? 0 : holeTemperature.hashCode());
        result = prime * result + (holePressure == null ? 0 : holePressure.hashCode());
        result = prime * result + (holeMaxDensity == null ? 0 : holeMaxDensity.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        WorkBaseOutputDto2 other = (WorkBaseOutputDto2) obj;

        if (wellName == null) {
            if (other.wellName != null) {
                return false;
            }
        } else if (!wellName.equals(other.wellName)) {
            return false;
        }
        if (country == null) {
            if (other.country != null) {
                return false;
            }
        } else if (!country.equals(other.country)) {
            return false;
        }
        if (area == null) {
            if (other.area != null) {
                return false;
            }
        } else if (!area.equals(other.area)) {
            return false;
        }
        if (block == null) {
            if (other.block != null) {
                return false;
            }
        } else if (!block.equals(other.block)) {
            return false;
        }
        if (oilfield == null) {
            if (other.oilfield != null) {
                return false;
            }
        } else if (!oilfield.equals(other.oilfield)) {
            return false;
        }
        if (geographicalPosition == null) {
            if (other.geographicalPosition != null) {
                return false;
            }
        } else if (!geographicalPosition.equals(other.geographicalPosition)) {
            return false;
        }
        if (structuralLocation == null) {
            if (other.structuralLocation != null) {
                return false;
            }
        } else if (!structuralLocation.equals(other.structuralLocation)) {
            return false;
        }
        if (waterDepth == null) {
            if (other.waterDepth != null) {
                return false;
            }
        } else if (!waterDepth.equals(other.waterDepth)) {
            return false;
        }
        if (mudLine == null) {
            if (other.mudLine != null) {
                return false;
            }
        } else if (!mudLine.equals(other.mudLine)) {
            return false;
        }
        if (wellType == null) {
            if (other.wellType != null) {
                return false;
            }
        } else if (!wellType.equals(other.wellType)) {
            return false;
        }
        if (wellSpacing == null) {
            if (other.wellSpacing != null) {
                return false;
            }
        } else if (!wellSpacing.equals(other.wellSpacing)) {
            return false;
        }
        if (workCompany == null) {
            if (other.workCompany != null) {
                return false;
            }
        } else if (!workCompany.equals(other.workCompany)) {
            return false;
        }
        if (drillingStartTime == null) {
            if (other.drillingStartTime != null) {
                return false;
            }
        } else if (!drillingStartTime.equals(other.drillingStartTime)) {
            return false;
        }
        if (drillingFinishTime == null) {
            if (other.drillingFinishTime != null) {
                return false;
            }
        } else if (!drillingFinishTime.equals(other.drillingFinishTime)) {
            return false;
        }
        if (actualWellDepth == null) {
            if (other.actualWellDepth != null) {
                return false;
            }
        } else if (!actualWellDepth.equals(other.actualWellDepth)) {
            return false;
        }
        if (holeTemperature == null) {
            if (other.holeTemperature != null) {
                return false;
            }
        } else if (!holeTemperature.equals(other.holeTemperature)) {
            return false;
        }
        if (holePressure == null) {
            if (other.holePressure != null) {
                return false;
            }
        } else if (!holePressure.equals(other.holePressure)) {
            return false;
        }
        if (holeMaxDensity == null) {
            if (other.holeMaxDensity != null) {
                return false;
            }
        } else if (!holeMaxDensity.equals(other.holeMaxDensity)) {
            return false;
        }
        return true;
    }
}
